\(\int \sqrt {a \csc ^2(x)} \, dx\) [50]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 10, antiderivative size = 26 \[ \int \sqrt {a \csc ^2(x)} \, dx=-\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right ) \]

[Out]

-arctanh(cot(x)*a^(1/2)/(a*csc(x)^2)^(1/2))*a^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {4207, 223, 212} \[ \int \sqrt {a \csc ^2(x)} \, dx=-\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right ) \]

[In]

Int[Sqrt[a*Csc[x]^2],x]

[Out]

-(Sqrt[a]*ArcTanh[(Sqrt[a]*Cot[x])/Sqrt[a*Csc[x]^2]])

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = -\left (a \text {Subst}\left (\int \frac {1}{\sqrt {a+a x^2}} \, dx,x,\cot (x)\right )\right ) \\ & = -\left (a \text {Subst}\left (\int \frac {1}{1-a x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a \csc ^2(x)}}\right )\right ) \\ & = -\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cot (x)}{\sqrt {a \csc ^2(x)}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.15 \[ \int \sqrt {a \csc ^2(x)} \, dx=\sqrt {a \csc ^2(x)} \left (-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sin (x) \]

[In]

Integrate[Sqrt[a*Csc[x]^2],x]

[Out]

Sqrt[a*Csc[x]^2]*(-Log[Cos[x/2]] + Log[Sin[x/2]])*Sin[x]

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92

method result size
default \(\frac {\sqrt {a \csc \left (x \right )^{2}}\, \sin \left (x \right ) \ln \left (\csc \left (x \right )-\cot \left (x \right )\right ) \sqrt {4}}{2}\) \(24\)
risch \(-2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}+1\right ) \sin \left (x \right )+2 \sqrt {-\frac {a \,{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}-1\right ) \sin \left (x \right )\) \(64\)

[In]

int((a*csc(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*(a*csc(x)^2)^(1/2)*sin(x)*ln(csc(x)-cot(x))*4^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 64, normalized size of antiderivative = 2.46 \[ \int \sqrt {a \csc ^2(x)} \, dx=\left [\frac {1}{2} \, \sqrt {-\frac {a}{\cos \left (x\right )^{2} - 1}} \log \left (-\frac {\cos \left (x\right ) - 1}{\cos \left (x\right ) + 1}\right ) \sin \left (x\right ), \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {-\frac {a}{\cos \left (x\right )^{2} - 1}} \cos \left (x\right ) \sin \left (x\right )}{a}\right )\right ] \]

[In]

integrate((a*csc(x)^2)^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(-a/(cos(x)^2 - 1))*log(-(cos(x) - 1)/(cos(x) + 1))*sin(x), sqrt(-a)*arctan(sqrt(-a)*sqrt(-a/(cos(x)^
2 - 1))*cos(x)*sin(x)/a)]

Sympy [F]

\[ \int \sqrt {a \csc ^2(x)} \, dx=\int \sqrt {a \csc ^{2}{\left (x \right )}}\, dx \]

[In]

integrate((a*csc(x)**2)**(1/2),x)

[Out]

Integral(sqrt(a*csc(x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.92 \[ \int \sqrt {a \csc ^2(x)} \, dx=-\sqrt {-a} {\left (\arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right )\right )} \]

[In]

integrate((a*csc(x)^2)^(1/2),x, algorithm="maxima")

[Out]

-sqrt(-a)*(arctan2(sin(x), cos(x) + 1) - arctan2(sin(x), cos(x) - 1))

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.50 \[ \int \sqrt {a \csc ^2(x)} \, dx=\sqrt {a} \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \mathrm {sgn}\left (\sin \left (x\right )\right ) \]

[In]

integrate((a*csc(x)^2)^(1/2),x, algorithm="giac")

[Out]

sqrt(a)*log(abs(tan(1/2*x)))*sgn(sin(x))

Mupad [F(-1)]

Timed out. \[ \int \sqrt {a \csc ^2(x)} \, dx=\int \sqrt {\frac {a}{{\sin \left (x\right )}^2}} \,d x \]

[In]

int((a/sin(x)^2)^(1/2),x)

[Out]

int((a/sin(x)^2)^(1/2), x)